﻿namespace Chapter04.DesignMode1 {
    public class SimplePizzaFactory {
        public static IPizza Create(string type) {
            return type switch {
                "cheese" => new CheesePizza(),
                "greek" => new GreekPizza(),
                "pepperini" => new PepperoniPizza(),
                "clam" => new ClamPizza(),
                "veggie" => new VeggiePizza(),
                _ => throw new NotImplementedException(),
            };
        }
    }
}
